package tgc.edu.szxt.demo.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import tgc.edu.szxt.demo.custom.BaseRepository;
import tgc.edu.szxt.demo.entity.Course;
import tgc.edu.szxt.demo.entity.Grade;
@Repository
public interface GradeRepository extends BaseRepository<Grade, Integer>{

	List<Grade> findByStudentId(Integer id);

	Grade findByStudentIdAndCourseId(Integer id, Integer kcId);

	
	@Query("select distinct t.course from Grade t where t.student.tbClass.id = ?1")
	List<Course> findDistinctCourseByTbClassId(Integer bjId);

	
   
	

}
